import hashlib
from  django_study import settings

def md5(data):
    obj = hashlib.md5(settings.SECRET_KEY.encode('utf-8'))
    obj.update(data.encode("utf-8"))
    # print(obj,type(obj))
    return obj.hexdigest()

if __name__ == '__main__':
    print(md5('123'))

